<template>
  <div class="tip">
   <H1>码云图床</H1>
   <span>一个专注于码云做图床的管理工具。</span>
   <div class="buttons-box">
     <el-button  type="success" @click="to('/configure')">开始使用</el-button>
   </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  props: {
    msg: String
  },
  data() {
    return{
       user:{},
       disabled:false
    }
  },
  created(){
    this.disabled = this.$store.state.login
  },
  watch:{
    '$store.state.login'(){
      this.avater = this.$store.state.avater
    }
  },
  methods:{
    to(link){
      if (this.$store.state.login) {
        this.$router.push('/private')
      } else {
        this.$router.push(link)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.tip{
  position: relative;
  top: 50%;
  height: 18.75rem;
  width: 60%;
  margin: -9.375rem auto 0 auto;
  text-align: center;
  color: #ffffff;
  H1{
    margin-bottom:25px;
  }
  span{
    font-size: 22px;
  }
  .buttons-box{
    display: flex;
    justify-content:space-around;
    margin-top: 3.75rem;
    padding:0 10rem;
    a {
      color: #ffffff;
      text-decoration:none;
    }
  }
}
</style>